Hệ thống xếp lịch học tín chỉ cho sinh viên CNTT trên PHP & MySQL
111.154 lượt xem;
- index.php
- project /
1 <?php
2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
3 $currDir = dirname(__FILE__);
4 include("{$currDir}/defaultLang.php");
5 include("{$currDir}/language.php");
6 include("{$currDir}/lib.php");
7
8 $x = new DataList;
9 $x->TableTitle = $Translation['homepage'];
10 $tablesPerRow = 2;
11 $arrTables = getTableList();
12
13 // according to provided GET parameters, either log out, show login form (possibly with a failed login message), or show homepage
14 if(isset($_GET['signOut'])){
15 logOutUser();
16 redirect("index.php?signIn=1");
17 }elseif(isset($_GET['loginFailed']) || isset($_GET['signIn'])){
18 if(!headers_sent() && isset($_GET['loginFailed'])) header('HTTP/1.0 403 Forbidden');
19 include("{$currDir}/login.php");
20 }else{
21 include("{$currDir}/dashboard.php");
22 }
2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
3 $currDir = dirname(__FILE__);
4 include("{$currDir}/defaultLang.php");
5 include("{$currDir}/language.php");
6 include("{$currDir}/lib.php");
7
8 $x = new DataList;
9 $x->TableTitle = $Translation['homepage'];
10 $tablesPerRow = 2;
11 $arrTables = getTableList();
12
13 // according to provided GET parameters, either log out, show login form (possibly with a failed login message), or show homepage
14 if(isset($_GET['signOut'])){
15 logOutUser();
16 redirect("index.php?signIn=1");
17 }elseif(isset($_GET['loginFailed']) || isset($_GET['signIn'])){
18 if(!headers_sent() && isset($_GET['loginFailed'])) header('HTTP/1.0 403 Forbidden');
19 include("{$currDir}/login.php");
20 }else{
21 include("{$currDir}/dashboard.php");
22 }